<template>
	<view class="container">
		<view class="flex diygw-col-24 justify-between flex-nowrap flex-clz">
			<view class="flex diygw-col-3 avatar2-clz">
				<view class="diygw-avatar sm white radius">
					<text class="diy-icon-back_android"></text>
				</view>
			</view>
			<view class="diygw-col-24 text5-clz"> 企业家互动 </view>
		</view>
		<view v-for="(item, index) in business.data.list" :key="index" class="flex diygw-col-24 justify-around flex-nowrap flex7-clz" @tap="navigateTo" data-type="page" data-url="/pages/qiyejiaxiangqing" :data-id="item.id_">
			<view class="flex diygw-col-0 justify-center">
				<view v-for="(item, index) in business.data.list" :key="index" class="diygw-avatar xs radius bg-none">
					<image mode="aspectFit" class="diygw-avatar-img radius" :src="item.pic_"></image>
				</view>
			</view>
			<view class="flex diygw-col-24 flex-direction-column justify-start flex-wrap flex1-clz">
				<view class="flex flex-wrap diygw-col-0 flex2-clz">
					<view class="diygw-col-0 text-clz">
						{{ item.user_name_ }}
					</view>
					<view class="diygw-col-0"> 已帮扶5家企业 </view>
				</view>
				<view class="flex flex-wrap diygw-col-0 flex3-clz">
					<view class="diygw-col-0 text2-clz">
						{{ item.need_type_ }}
					</view>
					<view class="diygw-col-0">
						{{ item.bus_name_ }}
					</view>
				</view>
				<view class="flex flex-wrap diygw-col-0 flex4-clz">
					<view class="diygw-col-0 text4-clz"> 管理时长： </view>
					<view class="diygw-col-0">
						{{ item.manage_time_ }}
					</view>
				</view>
				<view class="flex flex-wrap diygw-col-0 flex6-clz">
					<view class="diygw-col-0 text8-clz"> 资金评分： </view>
					<view class="diygw-col-0">
						{{ item.cash_ }}
					</view>
				</view>
			</view>
			<view class="flex diygw-col-0 justify-end items-end flex-nowrap flex5-clz">
				<view class="flex diygw-col-0 justify-end avatar3-clz">
					<view class="diygw-avatar xs radius">
						<text class="diy-icon-commentfill"></text>
					</view>
				</view>
				<view class="diygw-col-0 text7-clz"> 256 </view>
			</view>
		</view>
		<view class="clearfix"></view>
	</view>
</template>

<script>
	//create by: 邓志锋 <280160522@qq.com> <https://www.diygw.com> DIYGW可视化设计一键生成源码
	export default {
		data() {
			return {
				//用户全局信息
				userInfo: {},
				business: {
					code: '200',
					data: {
						count: 2,
						list: [
							{
								bus_own_: '地方收费多少',
								user_phone_: '13131313',
								pic_: './image',
								status_: '审核通过',
								user_name_: '佳佳',
								id_: '434437408591446017',
								bus_type_: '制造业',
								cash_: '9',
								bus_resource_: '资源',
								experience_: '9',
								bus_name_: '测试企业',
								bus_desc_: '测试企业',
								resource_: '9',
								manage_time_: '6'
							},
							{
								bus_own_: 'nn',
								user_phone_: '2332',
								pic_: './image',
								status_: '审核不通过',
								user_name_: 'ww',
								id_: '434437408591446018',
								bus_type_: '食品业',
								cash_: '8',
								bus_resource_: '资源',
								experience_: '8',
								bus_name_: '测试2',
								bus_desc_: '测试',
								resource_: '8',
								manage_time_: '7'
							}
						]
					},
					isOk: true
				}
			};
		},
		onShow() {
			this.setCurrentPage(this);
		},
		onLoad(option) {
			this.setCurrentPage(this);
			if (option) {
				this.setData({
					globalOption: this.getOption(option)
				});
			}

			this.init();
		},
		methods: {
			async init() {
				await this.businessApi();
			},
			// 企业家接口 API请求方法
			async businessApi() {
				let business = await this.$http.post(
					'https://agent.diygw.com/',
					{
						url: '/form/formCustSql/view/liststr_businessList',
						method: 'post',
						headers: {
							'Content-Type': 'application/x-www-form-urlencoded'
						},
						param: '{"curPage":1,"pageSize":"10","params":"{"isLocalPreview":"1"}"}'
					},
					{
						'Content-type': 'application/json'
					},
					'json'
				);
				this.business = business;
			}
		}
	};
</script>

<style lang="scss" scoped>
	.flex-clz {
		flex: 1;
	}
	.avatar2-clz {
		padding-top: 7px;
		font-weight: bold;
		padding-left: 0px;
		font-size: 16px;
		padding-bottom: 0px;
		padding-right: 0px;
	}
	.text5-clz {
		margin-left: 5px;
		padding-top: 10px;
		font-weight: bold;
		padding-left: 0px;
		width: calc(100% - 5px - 5px) !important;
		padding-bottom: 0px;
		margin-top: 5px;
		margin-bottom: 5px;
		text-align: center;
		margin-right: 5px;
		padding-right: 0px;
	}
	.flex1-clz {
		margin-left: 15px;
		width: calc(100% - 15px - 5px) !important;
		margin-top: 5px;
		margin-bottom: 5px;
		margin-right: 5px;
	}
	.text-clz {
		font-weight: bold;
	}
	.text2-clz {
		font-weight: bold;
	}
	.text4-clz {
		font-weight: bold;
	}
	.text8-clz {
		font-weight: bold;
	}
	.avatar3-clz {
		margin-left: 5px;
		background-size: 100% 100%;
		margin-top: 15px;
		margin-bottom: 5px;
		margin-right: 0px;
	}
	.text7-clz {
		margin-left: 5px;
		margin-top: 5px;
		margin-bottom: 10px;
		margin-right: 5px;
	}
	.container {
		padding-left: 0px;
		padding-right: 0px;

		font-size: 12px;
	}
	.container {
	}
</style>
